package com.security.controller;

import com.security.entity.User;
import com.security.service.IUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("user")
@Slf4j
public class UserController {

    @Autowired
    private IUserService userService;

    @PostMapping("/create/user")
    @ResponseBody
    public User createUser(@RequestBody User user){
        log.info("======");
        User res = userService.createUser(user);
        return res;
    }
}
